package com.exam.itempool.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import com.exam.role.model.Teacher;

/**
 * Questiontype entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class Questiontype implements java.io.Serializable
{

	// Fields

	private Integer id;
	private Teacher teacher;
	private String name;
	private Date createtime;
	private String flag;
	private String remarks;
	private Set questionOperations = new HashSet(0);
	private Set questionSelects = new HashSet(0);
	private Set questionJudges = new HashSet(0);
	private Set questionWordins = new HashSet(0);

	// Constructors

	/** default constructor */
	public Questiontype()
	{
	}

	/** full constructor */
	public Questiontype(Teacher teacher, String name, Date createtime, String flag, String remarks, Set questionOperations, Set questionSelects, Set questionJudges, Set questionWordins)
	{
		this.teacher = teacher;
		this.name = name;
		this.createtime = createtime;
		this.flag = flag;
		this.remarks = remarks;
		this.questionOperations = questionOperations;
		this.questionSelects = questionSelects;
		this.questionJudges = questionJudges;
		this.questionWordins = questionWordins;
	}

	// Property accessors

	public Integer getId()
	{
		return this.id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public Teacher getTeacher()
	{
		return this.teacher;
	}

	public void setTeacher(Teacher teacher)
	{
		this.teacher = teacher;
	}

	public String getName()
	{
		return this.name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public Date getCreatetime()
	{
		return this.createtime;
	}

	public void setCreatetime(Date createtime)
	{
		this.createtime = createtime;
	}

	public String getFlag()
	{
		return this.flag;
	}

	public void setFlag(String flag)
	{
		this.flag = flag;
	}

	public String getRemarks()
	{
		return this.remarks;
	}

	public void setRemarks(String remarks)
	{
		this.remarks = remarks;
	}

	public Set getQuestionOperations()
	{
		return this.questionOperations;
	}

	public void setQuestionOperations(Set questionOperations)
	{
		this.questionOperations = questionOperations;
	}

	public Set getQuestionSelects()
	{
		return this.questionSelects;
	}

	public void setQuestionSelects(Set questionSelects)
	{
		this.questionSelects = questionSelects;
	}

	public Set getQuestionJudges()
	{
		return this.questionJudges;
	}

	public void setQuestionJudges(Set questionJudges)
	{
		this.questionJudges = questionJudges;
	}

	public Set getQuestionWordins()
	{
		return this.questionWordins;
	}

	public void setQuestionWordins(Set questionWordins)
	{
		this.questionWordins = questionWordins;
	}

	@Override
	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + ((createtime == null) ? 0 : createtime.hashCode());
		result = prime * result + ((flag == null) ? 0 : flag.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((questionJudges == null) ? 0 : questionJudges.hashCode());
		result = prime * result + ((questionOperations == null) ? 0 : questionOperations.hashCode());
		result = prime * result + ((questionSelects == null) ? 0 : questionSelects.hashCode());
		result = prime * result + ((questionWordins == null) ? 0 : questionWordins.hashCode());
		result = prime * result + ((remarks == null) ? 0 : remarks.hashCode());
		result = prime * result + ((teacher == null) ? 0 : teacher.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final Questiontype other = (Questiontype) obj;
		if (createtime == null)
		{
			if (other.createtime != null)
				return false;
		} else if (!createtime.equals(other.createtime))
			return false;
		if (flag == null)
		{
			if (other.flag != null)
				return false;
		} else if (!flag.equals(other.flag))
			return false;
		if (id == null)
		{
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (name == null)
		{
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (questionJudges == null)
		{
			if (other.questionJudges != null)
				return false;
		} else if (!questionJudges.equals(other.questionJudges))
			return false;
		if (questionOperations == null)
		{
			if (other.questionOperations != null)
				return false;
		} else if (!questionOperations.equals(other.questionOperations))
			return false;
		if (questionSelects == null)
		{
			if (other.questionSelects != null)
				return false;
		} else if (!questionSelects.equals(other.questionSelects))
			return false;
		if (questionWordins == null)
		{
			if (other.questionWordins != null)
				return false;
		} else if (!questionWordins.equals(other.questionWordins))
			return false;
		if (remarks == null)
		{
			if (other.remarks != null)
				return false;
		} else if (!remarks.equals(other.remarks))
			return false;
		if (teacher == null)
		{
			if (other.teacher != null)
				return false;
		} else if (!teacher.equals(other.teacher))
			return false;
		return true;
	}

}